package com.choosefine.it.worker.service;

import java.util.List;
import java.util.Map;

import com.choosefine.it.base.dto.PageDTO;
import com.choosefine.it.basedata.model.UserInfo;
import com.choosefine.it.common.exception.BusinessException;
import com.choosefine.it.worker.model.FindWork;
import com.github.pagehelper.Page;


/**
 * 工人-->“我的” 选项卡 业务逻辑 接口
 * 
 * @author liaozhanggen
 */
public interface WorkerCenterService {

	/**
	 * 根据当前登录人，查看用户的“个人详情”信息
	 * 
	 * @param userId
	 * @return
	 * @throws BusinessException 
	 */
//	@Transactional(propagation=Propagation.SUPPORTS,readOnly=true)
	UserInfo findUserSingleDetailById(String userCode) throws BusinessException;

	/**
	 * 根据当前登录人，查看用户的“发布的工作管理”
	 * 
	 * @param userId
	 * @return
	 */
//	@Transactional(propagation=Propagation.SUPPORTS,readOnly=true)
	Page<FindWork> queryPublishWorkMgt(Map<String, Object> param,PageDTO page) throws BusinessException;
	
	/**
	 * 当前登录人，发布的工作
	 * 
	 * @param userId
	 * @return
	 */
//	@Transactional(propagation=Propagation.REQUIRED,isolation=Isolation.DEFAULT,readOnly=false)
	int insertPublishWork(FindWork findWork) throws BusinessException;
	
	/**
	 * 更新当前登录的用户基本个人信息
	 * 
	 * @param user
	 * @return
	 * @throws BusinessException 
	 */
//	@Transactional(propagation=Propagation.REQUIRED,isolation=Isolation.DEFAULT,readOnly=false)
	int updateUserInfo(UserInfo user) throws BusinessException;

}
